From: Sam Reed Date: Tue, 20 Dec 2011 21:37:51 +0000 (+0000) Subject: For r106521/r106865, wrap long example description strings X-Git-Tag: 1.31.0-rc.0~25851 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=b956a8eb19fa22600c3ce4a52505b27dd73c5fcc;p=lhc%2Fweb%2Fwiklou.git For r106521/r106865, wrap long example description strings Follows up r106439 --- diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index efbf1c0f11..920f114824 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -280,11 +280,11 @@ abstract class ApiBase extends ContextSource { $msg .= " $v\n"; } else { if ( is_array( $v ) ) { - $msg .= implode( "\n", array_map( array( $this, 'indentExampleText' ), $v ) ); + $msgExample = implode( "\n", array_map( array( $this, 'indentExampleText' ), $v ) ); } else { - $msg .= " $v"; + $msgExample = " $v"; } - $msg .= "\n $k"; + $msg .= wordwrap( $msgExample, 100, "\n" ) . "\n $k"; } } }